package FlashServer;

import java.io.IOException;

public class MainServer 
{
	public static final int DEFAULT_PORT = 15780;
	public static final String[] DEFAULT_POLICY = new String[] { "*" };
	public static final String POLICY_REQUEST = "<policy-file-request/>";
	public static final boolean DEBUG = true;

	private static PolicyServer FPolicyServer;
	private static GameServer FGameServer;
	private static String[] policyServerInit;	

	public static void main(String[] args) throws IOException 
	{
		int port = DEFAULT_PORT + 1;		
		policyServerInit = new String[] { "*:" + DEFAULT_PORT };
		FPolicyServer = new PolicyServer(port, policyServerInit);
		FPolicyServer.start();
		
		FGameServer = new GameServer(DEFAULT_PORT, 1000);
		FGameServer.start();
	}

	public static String PolicyXML() 
	{
		return FPolicyServer.buildPolicy(policyServerInit);
	}
}
